x86: provide and use hv_tsc_scale
authorWei Liu <liuwe@microsoft.com>
Fri, 20 Dec 2019 19:18:16 +0000 (19:18 +0000)
committerWei Liu <wl@xen.org>
Mon, 23 Dec 2019 10:51:29 +0000 (10:51 +0000)
commitbb2aa33c2a2591d2caa5f777e139da46483086c3
treed4345fcce9c2f44e046a0f981d488e5668bc1840
parentf1c6ae95b1ab7db66bc481ff37ce49c3c9158bc7
x86: provide and use hv_tsc_scale

The Hyper-V clock source and Xen's own viridian code need the same
functionality.

Move the function in viridian/time.c to hyperv.h and use it in both
places.

No functional change.

Signed-off-by: Wei Liu <liuwe@microsoft.com>
Reviewed-by: Paul Durrant <paul@xen.org>
xen/arch/x86/hvm/viridian/time.c
xen/arch/x86/time.c
xen/include/asm-x86/guest/hyperv.h